package com.asiainfo.nacos.demos.dubbo;

import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class DubboTestConsumer {

    @DubboReference(version = "1.0.0",timeout =3000 )
    private DubboHelloService dubboService;

    @GetMapping("/dubbo/{name}")
    public String sayHello(@PathVariable String name) {
        return dubboService.sayHello(name);
    }
}
